﻿using System;

namespace Whoever.Patterns.MVC.Utils
{
    public static class KO
    {
        public static string BindingByType(Type type, bool mustValidation)
        {
            var result = mustValidation ? "validValue" : "value";

            result = typeof(DateTime).IsAssignableFrom(type) || typeof(DateTime?).IsAssignableFrom(type) ? "datepicker" : result;

            return result;
        }
    }
}
